<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
  </head>
  <body>
    <div class="app">
      <span v-for="(item,index) in list" :key="index"
        ><input type="checkbox" :value="item" v-model="newList" />{{item}}</span
      >
      <ul v-if="newList.length">
        <li v-for="ele in newList">{{ele}}</li>
      </ul>
    </div>

    <script>
      const app = new Vue({
        el: ".app",
        data: {
          list: [
            "科幻",
            "喜剧",
            "动漫",
            "冒险",
            "科技",
            "军事",
            "娱乐",
            "奇闻",
          ],
          newList: [],
        },
      });
    </script>
  </body>
</html>
